<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<link rel="stylesheet" href="../style/common2.css" />
	<style>
		p{
			text-align: center;
			display:none;
		}
		p:nth-of-type(1){
			height:75px;
			line-height: 75px;
			font-size:16px;
			font-weight:900;			
		}
		p:nth-of-type(2){
			height:25px;
			line-height: 25px;
		}
		p:nth-of-type(3){
			height:75px;
			line-height: 75px;
		}
		.iconfont{
			font-size: 30px;
			color:#45b32e;
		}
		.preBtn{
			background:#ff6500;
			margin-right:50px;
			border-radius:3px;
		}
		.goBack{
			border-bottom:1px solid #6d6d6d;
			color:#6d6d6d;
			cursor:pointer;
		}
	</style>
	<body>
		<p><span class="iconfont">&#xe623;</span> 验价成功</p>
		<p>票面价/税费：￥<span class="yellowW price1"></span>/￥<span class="price2"></span></p>
		<p><span class="preBtn sure">确定</span><span class="goBack">返回</span></p>
	</body>
	<script type="text/javascript" src="../libs/jquery-1.12.4.js" ></script>
	<script type="text/javascript" src="../libs/layer-v2.4/layer/layer.js"></script>
	<script>
		var data = window.parent.checkFaxData;
		getAjax()
		function getAjax(){
			layer.load(3,{shadeClose:true});
			$.ajax({
				type:"post",
				url:"../flight/price/inter?&temp="+Math.random(),
				contentType:'application/json;charset=utf-8',
				data:JSON.stringify(data),
				async:true,
				dataType:"json",
				success:function(data){	
					layer.closeAll();					
					if(data.status=="1001"){
						$("p").show();
						var facePrice = data.data.adultFacePrice;
						var tax = toZeroString(data.data.adultAirportTax)+toZeroString(data.data.adultTax)+toZeroString(data.data.adultFuelTax);
						$(".price1").text(facePrice);
						$(".price2").text(tax);
					}else{
						layer.alert(data.message);
					}
				}
			})
		}				
		$(".sure,.goBack").click(function(){
			var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
            parent.layer.close(index);
		})
		function toZeroString(string){
			if(string == null || string == undefined ||string==""){
				return 0;
			}else{
				return string
			};
		}
		
		

	</script>
</html>
